package com.cskaoyan.bean.vo.front.goodsvo;


import com.cskaoyan.bean.vo.front.goodsvo.GoodsListBrandVo;
import com.cskaoyan.bean.po.MarketGoods;
import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.List;

/**
 * @program: SSMItem
 * @description
 * @author: YY
 * @create: 2022-10-14 19:51
 **/
@Data
public class GoodsListBrandVo {
    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<HotGoodsList> list;
    private List<FilterCategoryVo> filterCategoryList;

    public static GoodsListBrandVo data(PageInfo pageInfo, List<FilterCategoryVo> filterCategoryList) {
        GoodsListBrandVo data = new GoodsListBrandVo();
        data.setTotal((int) pageInfo.getTotal());
        data.setPages(pageInfo.getPages());
        data.setPage(pageInfo.getPageNum());
        data.setLimit(pageInfo.getPageSize());
        data.setList(pageInfo.getList());
        data.setFilterCategoryList(filterCategoryList);
        return data;
    }
}
